package priv.mill.server.impl;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import priv.mill.dao.mapper.CommentsMapper;
import priv.mill.entry.Comments;
import priv.mill.server.CommentsService;

@Component
public class CommentsServiceImpl implements CommentsService{

	private static final Logger logger = Logger
			.getLogger(CommentsServiceImpl.class);

	@Autowired
	private CommentsMapper commentsMapper;
	
	@Override
	public Comments getCommentsById(Integer commentsId) {
		return commentsMapper.getCommentsById(commentsId);
	}

	@Override
	public Comments getCommentsByEntry(Comments comments) {
		return commentsMapper.getCommentsByEntry(comments);
	}

	@Override
	public List<Comments> getCommentssByPage(Comments comments) {
		return commentsMapper.getCommentssByPage(comments);
	}

	@Override
	public int updateComments(Comments comments) {
		return commentsMapper.updateComments(comments);
	}

	@Override
	public int insertComments(Comments comments) {
		return commentsMapper.insertComments(comments);
	}

	@Override
	public int deleteComments(Integer commentsId) {
		return commentsMapper.deleteComments(commentsId);
	}
}
